#include "app.hpp"
#include <functional>
#include <iostream>
#include <boost/asio.hpp>

int main()
{
    std::string name = "zhangsan";
    app my_app(10,name);

    my_app.task_2();
    my_app.task_1();

    std::cout<<"end..."<<std::endl;
    
    
    /* Block process */
    boost::asio::io_context ioContext;
    boost::asio::signal_set signals(ioContext, SIGINT, SIGTERM);
    signals.async_wait([](const boost::system::error_code& error, int signal_number) {
        std::cout << "received signal " << signal_number << std::endl;
    });
    ioContext.run();
}